/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package healthcare.coursework.model;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Administrator
 */
public class MedicalHistory implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long medicalHistoryId;
    private Date diagnoseTime;
    private String diagnoseResult;
    private String medicineRecipe;
    private int weight;
    private int height;
    private int vessel;
    private boolean isDeleted;
    private Patient patient;

    public MedicalHistory() {
    }

    public MedicalHistory(Long medicalHistoryId) {
        this.medicalHistoryId = medicalHistoryId;
    }

    public MedicalHistory(String medicineRecipe, String diagnoseResult, int vessel, int weight, int height) {
        this.diagnoseResult = diagnoseResult;
        this.medicineRecipe = medicineRecipe;
        this.weight = weight;
        this.height = height;
        this.vessel = vessel;
    }

    public MedicalHistory(Long medicalHistoryId, Date diagnoseTime, int weight, int height, int vessel, boolean isDeleted) {
        this.medicalHistoryId = medicalHistoryId;
        this.diagnoseTime = diagnoseTime;
        this.weight = weight;
        this.height = height;
        this.vessel = vessel;
        this.isDeleted = isDeleted;
    }

    public Long getMedicalHistoryId() {
        return medicalHistoryId;
    }

    public void setMedicalHistoryId(Long medicalHistoryId) {
        this.medicalHistoryId = medicalHistoryId;
    }

    public Date getDiagnoseTime() {
        return diagnoseTime;
    }

    public void setDiagnoseTime(Date diagnoseTime) {
        this.diagnoseTime = diagnoseTime;
    }

    public String getDiagnoseResult() {
        return diagnoseResult;
    }

    public void setDiagnoseResult(String diagnoseResult) {
        this.diagnoseResult = diagnoseResult;
    }

    public String getMedicineRecipe() {
        return medicineRecipe;
    }

    public void setMedicineRecipe(String medicineRecipe) {
        this.medicineRecipe = medicineRecipe;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getVessel() {
        return vessel;
    }

    public void setVessel(int vessel) {
        this.vessel = vessel;
    }

    public boolean getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Patient getPatient() {
        return patient;
    }

    public void setPatient(Patient patient) {
        this.patient = patient;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (medicalHistoryId != null ? medicalHistoryId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof MedicalHistory)) {
            return false;
        }
        MedicalHistory other = (MedicalHistory) object;
        if ((this.medicalHistoryId == null && other.medicalHistoryId != null) || (this.medicalHistoryId != null && !this.medicalHistoryId.equals(other.medicalHistoryId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "healthcare.coursework.model.MedicalHistory[medicalHistoryId=" + medicalHistoryId + "]";
    }
}
